#ifndef _Array_h
#define _Array_h

#include "CxxUtils.h"
#include "LangUtils.h"

class DoOpArray
{
public: 
	class ds_array : public _DoOperator
	{
	protected: 
		ds_array(const ds_array &);
		ds_array& operator=(const ds_array &);
	public: 
		ds_array() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_left : public _DoOperator
	{
	protected: 
		ds_left(const ds_left &);
		ds_left& operator=(const ds_left &);
	public: 
		ds_left() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_right : public _DoOperator
	{
	protected: 
		ds_right(const ds_right &);
		ds_right& operator=(const ds_right &);
	public: 
		ds_right() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_length : public _DoOperator
	{
	protected: 
		ds_length(const ds_length &);
		ds_length& operator=(const ds_length &);
	public: 
		ds_length() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_get : public _DoOperator
	{
	protected: 
		ds_get(const ds_get &);
		ds_get& operator=(const ds_get &);
	public: 
		ds_get() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_put : public _DoOperator
	{
	protected: 
		ds_put(const ds_put &);
		ds_put& operator=(const ds_put &);
	public: 
		ds_put() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
				
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_getinterval : public _DoOperator
	{
	protected: 
		ds_getinterval(const ds_getinterval &);
		ds_getinterval& operator=(const ds_getinterval &);
	public: 
		ds_getinterval() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_putinterval : public _DoOperator
	{
	protected: 
		ds_putinterval(const ds_putinterval &);
		ds_putinterval& operator=(const ds_putinterval &);
	public: 
		ds_putinterval() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_astore : public _DoOperator
	{
	protected: 
		ds_astore(const ds_astore &);
		ds_astore& operator=(const ds_astore &);
	public: 
		ds_astore() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
	};

	class ds_aload : public _DoOperator
	{
	protected: 
		ds_aload(const ds_aload &);
		ds_aload& operator=(const ds_aload &);
	public: 
		ds_aload() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_copy : public _DoOperator
	{
	protected: 
		ds_copy(const ds_copy &);
		ds_copy& operator=(const ds_copy &);
	public: 
		ds_copy() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	class ds_forall : public _DoOperator
	{
	protected: 
		ds_forall(const ds_forall &);
		ds_forall& operator=(const ds_forall &);
	public: 
		ds_forall() : _DoOperator() {
		}

		virtual void execute(DevilSemantic &semantic);
		
		virtual bool match(DevilSemantic &state) const;
	};

	static void push(_DoDictionaryMultimap& dict) {
		dict.put(CRefPtr< _DoObject >(new DoName("array")), CRefPtr< _DoObject >(new ds_array()));
		dict.put(CRefPtr< _DoObject >(new DoName("left")), CRefPtr< _DoObject >(new ds_left()));
		dict.put(CRefPtr< _DoObject >(new DoName("right")), CRefPtr< _DoObject >(new ds_right()));
		dict.put(CRefPtr< _DoObject >(new DoName("length")), CRefPtr< _DoObject >(new ds_length()));
		dict.put(CRefPtr< _DoObject >(new DoName("get")), CRefPtr< _DoObject >(new ds_get()));
		dict.put(CRefPtr< _DoObject >(new DoName("put")), CRefPtr< _DoObject >(new ds_put()));
		dict.put(CRefPtr< _DoObject >(new DoName("getinterval")), CRefPtr< _DoObject >(new ds_getinterval()));
		dict.put(CRefPtr< _DoObject >(new DoName("putinterval")), CRefPtr< _DoObject >(new ds_putinterval()));
		dict.put(CRefPtr< _DoObject >(new DoName("astore")), CRefPtr< _DoObject >(new ds_astore()));
		dict.put(CRefPtr< _DoObject >(new DoName("aload")), CRefPtr< _DoObject >(new ds_aload()));
		dict.put(CRefPtr< _DoObject >(new DoName("copy")), CRefPtr< _DoObject >(new ds_copy()));
		dict.put(CRefPtr< _DoObject >(new DoName("forall")), CRefPtr< _DoObject >(new ds_forall()));
	}
};

#endif
